package top.hidoctor.auscultation.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import top.hidoctor.auscultation.R;
import top.hidoctor.auscultation.bean.AuditListBean;

public class ShenheRwbAdapter extends BaseQuickAdapter<AuditListBean.ResultBean> {
    public ShenheRwbAdapter(int layoutResId, List<AuditListBean.ResultBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, AuditListBean.ResultBean item) {
        helper.setText(R.id.tv_no, item.getName())
                .setText(R.id.tv_audit_doc, "审核医生：" + item.getAuditUserName())
                .setText(R.id.tv_number, item.getSampleTotal() + "")
                .setText(R.id.tv_status, item.getStatus() == 10 ? "审核开始" : item.getStatus() == 20 ? "审核完成" : "")
                .setBackgroundRes(R.id.tv_status, item.getStatus() == 10 ? R.drawable.bg_yellow_8_2 : item.getStatus() == 20 ? R.drawable.bg_blue_8_2 : null)
                .setTextColor(R.id.tv_status, item.getStatus() == 10 ? mContext.getResources().getColor(R.color.main_yellow) : item.getStatus() == 20 ? mContext.getResources().getColor(R.color.blue_main) : null);
    }
}
